package com.pace.day03;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.context.annotation.Bean;import org.springframework.core.env.Environment;import org.springframework.stereotype.Component;/** * @Auther: sky * @Date: 2019/3/28 00:14 * @Description: */@Componentpublic class PropertySourceTest {    @Autowired    Environment env;    @Bean    public InitBean initBean(){        String drive= env.getProperty("jdbc.driver");        String username=env.getProperty("jdbc.username");        return new InitBean(drive,username);    }}